package edu.sysu.cshare.gui;

import java.awt.BorderLayout;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;

import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JEditorPane;
import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.JTextArea;
import javax.swing.JLabel;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Color;
import java.awt.Font;

public class Pnl_Help extends JPanel {

	/**
	 * Create the panel.;
	 */
	public Pnl_Help() {
		setLayout(new BorderLayout(0, 0));

		JTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);
		tabbedPane.setForeground(new Color(30, 144, 255));
		tabbedPane.setBackground(new Color(30, 144, 255));
		add(tabbedPane);

		JPanel panel_1 = new JPanel();
		tabbedPane.addTab("用户手册", null, panel_1, null);
		panel_1.setLayout(new BorderLayout(0, 0));
		JTextPane textPane = new JTextPane();
		textPane.setEditable(false);
		try {
			textPane.setPage(this.getClass().getResource("/edu/sysu/cshare/help/user-help.html"));
		} catch (MalformedURLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		JScrollPane scrollPane = new JScrollPane(textPane);
		panel_1.add(scrollPane, BorderLayout.CENTER);
		JPanel panel = new JPanel();
		tabbedPane.addTab("版本信息", null, panel, null);
		panel.setLayout(new BorderLayout(0, 0));
		
		JTextArea txtrCshareV = new JTextArea();
		txtrCshareV.setFont(new Font("Monospaced", Font.BOLD, 20));
		txtrCshareV.setWrapStyleWord(true);
		txtrCshareV.setToolTipText("");
		txtrCshareV.setForeground(Color.BLUE);
		txtrCshareV.setBackground(new Color(175, 238, 238));
		txtrCshareV.setText("\r\n\r\n\r\nCShare v1.0\r\n\r\n开发团队：\t08网工CShare团队\r\n\r\n团队负责人：\t朱正浩\r\n\r\n联系方式：\tzzh1989829@gmail.com");
		panel.add(txtrCshareV, BorderLayout.CENTER);

	}

}
